package com.alipay.alipayDemo.service;

import com.alipay.api.AlipayApiException;
import com.alipay.alipayDemo.bean.AlipayBean;

import java.util.Map;

/**
 * 功能描述: 支付服务
 *
 * @author lixiaoxiao
 * @date 2022/09/20 23:46
 * @since JDK 1.8
 */
public interface PayService {

    /**
     * 功能描述: 支付宝支付
     *
     * @param alipayBean 支付实体
     * @return {@link String}
     * @author lixiaoxiao
     * @date 2022/09/20 23:46
     * @since JDK 1.8
     */
    String aliPay(AlipayBean alipayBean) throws AlipayApiException;

    /**
     * 功能描述: 支付回调验签
     *
     * @param params 获取支付宝POST过来反馈信息
     * @param tradeStatus 获取支付宝POST过来反馈信息
     * @return {@link Boolean}
     * @author lixiaoxiao
     * @date 2022/09/20 15:20
     */
    String rsaCheck(Map<String, String> params, String tradeStatus);

    /**
     * 功能描述: 支付宝退款
     *
     * @param alipayBean 支付实体
     * @return {@link String}
     * @author lixiaoxiao
     * @date 2022/09/20 14:18
     * @since JDK 1.8
     */
    String alipayRefound(AlipayBean alipayBean) throws AlipayApiException;
}
